package com.qupai.controller.admin;

import com.qupai.domain.dto.AdminLoginDTO;
import com.qupai.domain.result.Result;
import com.qupai.domain.vo.AdminLoginVO;
import com.qupai.service.IAdminService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/admin/admin")
@Tag(name = "管理员相关接口")
public class AdminController {

    @Resource
    private IAdminService adminService;

    /**
     *
     * @param adminLoginDTO
     * @return
     */
    @GetMapping("/login")
    @Operation(summary = "登录")
    public Result<AdminLoginVO> login(@RequestBody AdminLoginDTO adminLoginDTO)
    {
        return Result.success(adminService.login(adminLoginDTO));
    }
}
